package com.tanglongan.designPattern.dp17_memento.demo01;

import java.util.Stack;

public class DraftsBox {

    private final Stack<ArticleMemento> mementos = new Stack<>();

    public void addMemento(ArticleMemento memento) {
        mementos.push(memento);
    }

    public ArticleMemento getMemento() {
        return mementos.pop();
    }

}
